/**
 * 
 */

!function() {
	$(document).ready(function () {
		$('#submit').click(function () {
			$.ajax({
				url: window.webService('user/login'),
				data: {
					username: $('#inputEmail').val(),
					password: $('#inputPassword').val()
				},
				dataType: 'json',
				method: 'POST',
				success: function (response) {
					if (response.status == 0) {
						location = window.absoluteURL('/menu');
					} else {
						alert('登陆失败');
					}
				}
			});
			return false;
		});
	});
}();